#ifndef WORKFLOW_H
#define WORKFLOW_H

#include "database.h"
#include "helpers.h"

namespace acidone
{

class WorkflowBase
{
public:
	WorkflowBase(CategoryManager* categoryManager);

	CategoryManager* categoryManager() const;

	virtual Category* startCategory() const;
	virtual Category* endCategory() const;

	virtual bool canBeDone(Task* task) const = 0;
	virtual Database::Categories nextCategories(Category* category) const = 0;

	virtual ~WorkflowBase() {}

protected:
	CategoryManager* m_categoryManager;
};

class ManualWorkflow : public WorkflowBase
{
public:
	ManualWorkflow(CategoryManager* categoryManager);

	virtual bool canBeDone(Task *task) const;
	virtual Database::Categories nextCategories(Category *category) const;
};

class AcidWorkflow : public WorkflowBase
{
public:
	AcidWorkflow(CategoryManager* categoryManager);

	virtual bool canBeDone(Task *task) const;
	virtual Database::Categories nextCategories(Category *category) const;
};

}

#endif // WORKFLOW_H
